function startMove(obj,attr,iTarget)
{
	var timer=obj.timer?obj.timer:null;
    clearInterval(timer);
    obj.timer=setInterval(function()
    {
        var cur=0;
        if(attr=="opacity")
        {
            cur=Math.round(parseFloat(getStyle(obj ,attr))*100);
        }
        else
        {
            cur=parseInt(getStyle(obj ,attr));
        }
        var speed=(iTarget-cur)/8;
        speed=speed>0?Math.ceil(speed):Math.floor(speed);
        if(cur==iTarget)
        {
            clearInterval(obj.timer);
        }
        else
        {
            if(attr=="opacity")
            {
                obj.style.filter="alpha(opacity:'+(cur+speed)+')";
                obj.style.opacity=(cur+speed)/100;
            }
            else
            {
                obj.style[attr]=cur+speed+"px";
            }
        }
    },30);
}
/**��װ�˶�����**/
function getStyle(obj,name)
{
    if(obj.currentStyle)
    {
        return obj.currentStyle[name];
    }
    else
    {
        return getComputedStyle(obj ,null)[name];
    }
}
/**��ȡ���м���ʽ**/
function getByClass( oParent , sClass)
 {
	var aResult=[];
	var aEle=oParent.getElementsByTagName("*");
	for(var i=0;i<aEle.length;i++)
	{
		if(aEle[i].className.indexOf(sClass) != -1)
		{
		   aResult.push(aEle[i]);
		}
	}
	return aResult;
}
/**�Ӹ����ϻ�ȡԪ��**/
window.onload=function()
{
	var oDiv=document.getElementById("div1");
    var bannerLink=document.getElementsByTagName("bannerLink")[0];
    var prve=document.getElementById("prve");
    var next=document.getElementById("next");
    var p=document.getElementById("p");
    var span=p.getElementsByTagName("span");
    var arr=['bg1.jpg','bg2.jpg','bg3.jpg'];
        for(var i=0;i<span.length;i++)
		{
            span[i].index=i;
            span[i].onmouseover=function()
			{
				for(var i=0;i<span.length;i++)
				{
					span[i].className='';
				}
				    this.className="active";	
					oDiv.style.background= 'url(images/'+arr[this.index]+') left top no-repeat';
			}	
        }
    var num=0;
    next.onclick=function()
    {
        num++;
        if(num==span.length)
        {
            num=0;
        }
        for(var i=0;i<span.length;i++)
		{
			span[i].className='';
		}
			span[num].className="active";	
		    oDiv.style.background= 'url(images/'+arr[num]+') left top no-repeat';	
    }
    prve.onclick=function()
    {
        num--;
        if(num==-1)
        {
            num=span.length-1;
        }
		for(var i=0;i<span.length;i++)
		{
			span[i].className='';
		}
			span[num].className="active";	
		oDiv.style.background= 'url(images/'+arr[num]+') left top no-repeat';
    }
    var   timer=setInterval(next.onclick ,2000);
    oDiv.onmouseover=function()
    {
        clearInterval(timer);
    }
    oDiv.onmouseout=function()
    {
        timer=setInterval(next.onclick ,2000);
    }
	function tab()
	{
	   var oDiv=document.getElementById("div1");
	   
	}
/***ѡ�����***/	
/***bannerѡ���������***/
var  Online=document.getElementById('Online');
	 var OnlineConTopShow=getByClass(Online ,'OnlineConTopShow')[0];
     var OnlineConTopMenuShow=getByClass(Online ,'OnlineConTopMenuShow');
	 var OnlineConTophidden=getByClass(Online,'OnlineConTophidden');
	 var OnlineConhidden=getByClass(Online,'OnlineConhidden')[0];
	 for(var i=0;i<OnlineConTopMenuShow.length;i++)
	 {
		OnlineConTopMenuShow[i].index=i; 
		OnlineConTopMenuShow[i].onmouseover=function()
		{
		   startMove(OnlineConTophidden[this.index],'bottom',0); 	
		} 
		OnlineConTopMenuShow[i].onmouseout=function()
		{
		   startMove(OnlineConTophidden[this.index],'bottom',-320); 	
		} 
	 }
	    OnlineConTopShow.onmouseover=function()
		{
		   startMove(OnlineConhidden,'bottom',0); 	
		} 
		OnlineConTopShow.onmouseout=function()
		{
		   startMove(OnlineConhidden,'bottom',-320); 	
		} 
/***************��Ӱ�̳̺ϼ�**********************/
   var RetouchingCon=document.getElementById("RetouchingCon");
   var aLi=RetouchingCon.getElementsByTagName("li");
   var aImg=RetouchingCon.getElementsByTagName("img");
   for(var i=0;i<aLi.length;i++)
   {
	   aLi[i].index=i;
	   aLi[i].onmouseover=function()
	   {
		   startMove(aImg[this.index],'top',-8);     
	   }
	   aLi[i].onmouseout=function()
	   {
		   startMove(aImg[this.index],'top',0);     
	   }
   }
 /***************��ͼ��ɫ����********************/
   var fashion=document.getElementById("fashion");
   var emotion=document.getElementById("emotion");
   var city=document.getElementById("city");
   var world=document.getElementById("world");
   var music=document.getElementById("music");
   var pictureConMenu=document.getElementById("pictureConMenu");
   var emotionConMenu=document.getElementById("emotionConMenu");
   var cityMenu=document.getElementById("cityMenu");
   var worldMenu=document.getElementById("worldMenu");
   var musicMenu=document.getElementById("musicMenu");
   fashion.onmouseover=function()
   {
	   startMove(pictureConMenu,'bottom',0);     
   }
   fashion.onmouseout=function()
   {
	   startMove(pictureConMenu,'bottom',-426);     
   }
   emotion.onmouseover=function()
   {
	   startMove(emotionConMenu,'bottom',0);     
   }
   emotion.onmouseout=function()
   {
	   startMove(emotionConMenu,'bottom',-426);     
   }
   city.onmouseover=function()
   {
	   startMove(cityMenu,'bottom',0);     
   }
   city.onmouseout=function()
   {
	   startMove(cityMenu,'bottom',-320);     
   }
   world.onmouseover=function()
   {
	   startMove(worldMenu,'bottom',0);     
   }
   world.onmouseout=function()
   {
	   startMove(worldMenu,'bottom',-320);     
   }
   music.onmouseover=function()
   {
	   startMove(musicMenu,'bottom',0);     
   }
   music.onmouseout=function()
   {
	   startMove(musicMenu,'bottom',-320);     
   }
/***************������Ӱ��Ʒ�ο������񡢷�⡢����ͼƬ�ο�********************/
 var LightroomCon=document.getElementById('LightroomCon');
	 var ai=LightroomCon.getElementsByTagName('li');
	 var amg=LightroomCon.getElementsByTagName("img");
	 for(var i=0;i<ai.length;i++)
	 {
		 ai[i].index=i;
	     ai[i].onmouseover=function()
		 {
		    startMove(amg[this.index],'opacity',100);
		 }	 
		 ai[i].onmouseout=function()
		 {
		    startMove(amg[this.index],'opacity',60);
		 }	 
	 } 	 
/***************����LightroomԤ�����أ�VSCO 01-07ȫ������- ********************/	 
var  bbsCon=document.getElementById("bbsCon");
	var  menuShow=getByClass(bbsCon ,"menuShow");
	var  menuHidden=getByClass(bbsCon ,"menuHidden");
	for( var i=0 ;i<menuShow.length;i++)
	{
		  menuShow[i].index=i;
		  menuShow[i].onmouseover=function()
		{
		  startMove(menuHidden[this.index],'bottom',0);
        }  
		  menuShow[i].onmouseout=function()
		{
		  startMove(menuHidden[this.index],'bottom',-146);
        }  
	}
/***************��ѡ��Ӱ������̳�������� ********************/
 var fixMenu=document.getElementById('fixMenu'); 
    var fixMenuShow=getByClass(fixMenu ,"fixMenuShow");
	var fixMenuHidden=getByClass(fixMenu ,"fixMenuHidden");
	for(var i=0;i<fixMenuShow.length;i++)
	{
		fixMenuShow[i].index = i;
	   	fixMenuShow[i].onmouseover=function()
		{
		    startMove(fixMenuHidden[this.index],'opacity','100');	
		}
		fixMenuShow[i].onmouseout=function()
		{
		    startMove(fixMenuHidden[this.index],'opacity','0');	
		}
	}
/**************�Ҳ�̶����� ********************/
}        

